package com.sojson.util.security.springsecurity.service.impl;

import com.sojson.config.condition.MyConfigurationCondition;
import com.sojson.constant.ConstantByMap;
import com.sojson.enums.core.EEnvironmentType;
import com.sojson.util.security.springsecurity.service.IAnnotationService;

/**
 * 关闭权限验证
 *
 * @author liu
 * @date 2021-04-28
 */
public class SecurityCloseCondition extends MyConfigurationCondition {

    @Override
    @SuppressWarnings("unused")
    public boolean matches() {
        return !IAnnotationService.isEnabled && ConstantByMap.ENVIRONMENT == EEnvironmentType.TEST.getCode();
    }

}